package singleNumber

func singleNumber(nums []int) int {
	l := len(nums)
	h := make(map[int]int)

	for i := 0; i < l; i++ {
		h[nums[i]]++
	}
	for k, v := range h {
		if v == 1 {
			return k
		}
	}
	return 0
}
